import SimpleSchema from 'simpl-schema';

SimpleSchema.setDefaultMessages({
  initialLanguage: 'zh_cn',
  messages: {
    zh_cn: {
      required: '{{{label}}}不能为空',
      minString: '{{{label}}}至少为{{min}}个字符',
      maxString: '{{{label}}}不能大于{{max}}个字符',
      minNumber: '{{{label}}}不能小于{{min}}',
      maxNumber: '{{{label}}}不能大于{{max}}',
      minNumberExclusive: '{{{label}}}必须大于{{min}}',
      maxNumberExclusive: '{{{label}}}必须小于{{max}}',
      minDate: '{{{label}}}不能小于{{min}}',
      maxDate: '{{{label}}}不能超过{{max}}',
      badDate: '{{{label}}}不是有效的日期',
      minCount: '不能指定小于{{minCount}}个值',
      maxCount: '不能指定超过{{maxCount}}个值',
      noDecimal: '{{{label}}}必须是整数',
      notAllowed: '{{{value}}}是不允许的值',
      expectedType: '{{{label}}}必须是{{dataType}}类型',
    },
  },
});

export default SimpleSchema;